<?php

namespace Zilla\FrontBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Doctrine\Common\Collections\ArrayCollection;

/**
 * Zilla\FrontBundle\Entity\Product
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="Zilla\FrontBundle\Entity\ProductRepository")
 */
class Product
{
    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string $name
     *
     * @ORM\Column(name="name", type="string", length=255)
     */
    private $name;
    
    /**
     * @var double $price
     *
     * @ORM\Column(name="price", type="float")
     */
    private $price;
    
    /**
     * @var integer $amount
     *
     * @ORM\Column(name="amount", type="integer")
     */
    private $amount;
    
    /**
     *  @var datetime $createdAt
     * 
     * @Gedmo\Timestampable(on="create") 
     * @ORM\Column(name="created_at", type="datetime")
     */
    private $createdAt;
    
    /**
     *  @var datetime $updatedAt
     * 
     * @Gedmo\Timestampable(on="update") 
     * @ORM\Column(name="updated_at", type="datetime")
     */
    private $updatedAt;
    
    /**
     * 
     * @var string $slugName
     * 
     * @Gedmo\Slug(fields={"name"})
     * @ORM\Column(name="slug_name",length=255, unique=true)
     */
    private $slugName;

    /**
     * 
     * Bidirectional 
     * 
     * @var ProWinkerCategory $proWinkerCategory
     * 
     * @ORM\ManyToOne(targetEntity="ProductCategory", inversedBy="products")
     * @ORM\JoinColumn(name="category_id", referencedColumnName="id")
     */
    private $productCategory;
    
    /**
     * 
     * Bidirectional 
     * 
     * @var Store $store
     * 
     * @ORM\ManyToOne(targetEntity="Store", inversedBy="products")
     * @ORM\JoinColumn(name="store_id", referencedColumnName="id")
     */
    private $store;

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set name
     *
     * @param string $name
     * @return Product
     */
    public function setName($name)
    {
        $this->name = $name;
    
        return $this;
    }

    /**
     * Get name
     *
     * @return string 
     */
    public function getName()
    {
        return $this->name;
    }
    
    /**
     *
     * @return double
     */
    public function getPrice()
    {
        return $this->price;
    }

    /**
     *
     * @param double $price 
     */
    public function setPrice($price)
    {
        $this->price = $price;
    }
    
    /**
     *
     * @return integer 
     */
    public function getAmount()
    {
        return $this->amount;
    }

    /**
     *
     * @param integer $amount 
     */
    public function setAmount($amount)
    {
        $this->amount = $amount;
    }

    /**
     *
     * @return datetime
     */
    public function getCreatedAt()
    {
        return $this->createdAt;
    }

    /**
     *
     * @param datetime $created 
     */
    public function setCreatedAt($createdAt)
    {
        $this->createdAt = $createdAt;
    }
    
    /**
     *
     * @return datetime
     */
    public function getUpdatedAt()
    {
        return $this->updatedAt;
    }

    /**
     *
     * @param datetime $updatedAt 
     */
    public function setUpdatedAt($updatedAt)
    {
        $this->updatedAt = $updatedAt;
    }
        
    /**
     *
     * @return string
     */ 
    public function getSlugName()
    {
        return $this->slugName;
    }
    
    /**
     *
     * @param string $slugName 
     */
    public function setSlugName($slugName)
    {
        $this->slugName = $slugName;
    }

        
    /**
     *
     * @return ProductCategory
     */
    public function getProductCategory()
    {
        return $this->productCategory;
    }

    /**
     *
     * @param ProductCategory $productCategory 
     */
    public function setProductCategory(ProductCategory $productCategory)
    {
        $this->productCategory = $productCategory;
    }
    
    /**
     *
     * @return Store
     */
    public function getStore()
    {
        return $this->store;
    }

    /**
     *
     * @param Store $store 
     */
    public function setStore(Store $store)
    {
        $this->store = $store;
    }

    





}
